package com.huiminpay.transaction.api;

import com.huiminpay.merchant.common.cache.domain.BusinessException;
import com.huiminpay.transaction.dto.PayChannelDTO;
import com.huiminpay.transaction.dto.PayChannelParamDTO;
import com.huiminpay.transaction.dto.PlatformChannelDTO;

import java.util.List;

public interface PayChannelService {
    //获取平台服务类型
    List<PlatformChannelDTO> queryPlatformChannel() throws BusinessException;
   //绑定app和平台服务类型
    void bindPlatformChannelForApp(String appId,String platformChannel) throws BusinessException;

    //根据appId和platformChannel查询服务类型绑定状态
    int queryAppBindPlatformChannel(String appId,String platformChannel) throws BusinessException;
    //根据平台服务类型获取支付渠道列表
    List<PayChannelDTO> queryPayChannelByPlatformChannel(String platformChannelCode) throws BusinessException;
   //保存支付渠道参数
    void savePayChannelParam(PayChannelParamDTO payChannelParam) throws BusinessException;
   //根据appId和platformChannel查询支付渠道参数列表（可能是多个）
    List<PayChannelParamDTO> queryPayChannelParamByAppAndPlatform(String appId, String platformChannel) throws BusinessException;
    //根据appId、platformChannel和payChannel查询支付渠道参数（一个）
    PayChannelParamDTO queryParamByAppPlatformAndPayChannel(String appId, String platformChannel,String payChannel) throws BusinessException;
}
